package com.tudouji.project.quality.service.impl;

import java.util.List;

import com.tudouji.common.utils.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.quality.mapper.QastandardMapper;
import com.tudouji.project.quality.domain.Qastandard;
import com.tudouji.project.quality.service.IQastandardService;

/**
 * 扣杂标准Service业务层处理
 * 
 * @author tudouji
 * @date 2021-03-08
 */
@Service
public class QastandardServiceImpl implements IQastandardService 
{
    @Autowired
    private QastandardMapper qastandardMapper;

    /**
     * 查询扣杂标准
     * 
     * @param guid 扣杂标准ID
     * @return 扣杂标准
     */
    @Override
    public Qastandard selectQastandardById(String guid)
    {
        return qastandardMapper.selectQastandardById(guid);
    }

    /**
     * 查询扣杂标准列表
     * 
     * @param qastandard 扣杂标准
     * @return 扣杂标准
     */
    @Override
    public List<Qastandard> selectQastandardList(Qastandard qastandard)
    {
        return qastandardMapper.selectQastandardList(qastandard);
    }

    /**
     * 新增扣杂标准
     * 
     * @param qastandard 扣杂标准
     * @return 结果
     */
    @Override
    public int insertQastandard(Qastandard qastandard)
    {
        qastandard.setGuid(IdUtils.fastSimpleUUID());
        return qastandardMapper.insertQastandard(qastandard);
    }

    /**
     * 修改扣杂标准
     * 
     * @param qastandard 扣杂标准
     * @return 结果
     */
    @Override
    public int updateQastandard(Qastandard qastandard)
    {
        return qastandardMapper.updateQastandard(qastandard);
    }

    /**
     * 批量删除扣杂标准
     * 
     * @param guids 需要删除的扣杂标准ID
     * @return 结果
     */
    @Override
    public int deleteQastandardByIds(String[] guids)
    {
        return qastandardMapper.deleteQastandardByIds(guids);
    }

    /**
     * 删除扣杂标准信息
     * 
     * @param guid 扣杂标准ID
     * @return 结果
     */
    @Override
    public int deleteQastandardById(String guid)
    {
        return qastandardMapper.deleteQastandardById(guid);
    }
}
